﻿/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#include "../import/head.h"
#include "head.h"

namespace xos_container
{

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 

    os::os()
    {
    }

    os::~os()
    {
    }

    int os::init()
    {
        int ret = 0;

        if( 0 == ret )
        {
            ret = core::init();
        }

        if( 0 == ret )
        {
            ret = common::init();
        }

        if( 0 == ret )
        {
            ret = xml::init();
        }

        if( 0 == ret )
        {
            ret = log::init();
        }

        if( 0 == ret )
        {
            ret = box::init();
        }

        if( 0 == ret )
        {
            ret = json::init();
        }

        if( 0 == ret )
        {
            ret = sqlite::init();
        }

        if( 0 == ret )
        {
            ret = curl::init();
        }

        if( 0 == ret )
        {
            ret = compress::init();
        }

        if( 0 == ret )
        {
            ret = encrypt::init();
        }

        if( 0 == ret )
        {
            ret = package::init();
        }

        if( 0 == ret )
        {
            ret = aio::init();
        }

		if( 0 == ret )
        {
            ret = http::init();
        }

        if( 0 == ret )
        {
            ret = odbc::init();
        }

        return ret;
    }

    int os::term()
    {
        int ret = 0;

        odbc::term();
		http::term();
		aio::term();
		package::term();
		encrypt::term();
		compress::term();
        curl::term();
        sqlite::term();
		json::term();
		box::term();
        log::term();
		xml::term();
		common::term();
        core::term();

        return ret;
    }

} // xos_container
